package edu.xja.controller;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

@WebServlet("/first")
public class FirstController extends HttpServlet {


    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("text/html;charset=utf-8");
//        PrintWriter pr=response.getWriter();
//        pr.println("我的第一个servelet");
        request.setAttribute("adminName","Thomas Guo");
        request.getRequestDispatcher("/admin/test.jsp").forward(request,response);
    }
}
